/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

/**
 * <p>Project: jse2303 - Op4
 * <p>Powered by webrx On 2023-07-06 16:51:24
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Op4 {
    public static void main(String[] args) {
        boolean f = true;
        //Math.random() 0-1 之间的随机小数double
        if (Math.random() < .1) {
            System.out.println("yes");
        } else {
            System.out.println("no");
        }


        //&& || !
        int i = 3;
        //支持短路
        System.out.println(i < 1 && ++i > 1);
        System.out.println(i);

        //不支持短路
        System.out.println(i < 1 & ++i > 1);
        System.out.println(i);


        System.exit(0);

        System.out.println("逻辑与&&");
        System.out.println(true && false);
        System.out.println(true && true);
        System.out.println(false && true);
        System.out.println(false && false);

        System.out.println("逻辑与&");
        System.out.println(true & false);
        System.out.println(true & true);
        System.out.println(false & true);
        System.out.println(false & false);


        System.out.println("逻辑或||");
        System.out.println(true || false);
        System.out.println(true || true);
        System.out.println(false || true);
        System.out.println(false || false);

        System.out.println("逻辑或|");
        System.out.println(true | false);
        System.out.println(true | true);
        System.out.println(false | true);
        System.out.println(false | false);

        System.out.println("逻辑非!");
        System.out.println(!!!!true && false);

        //&&（支持短路）    &
    }
}
